package com.cn.zengzeng.spbzengzeng.test;

import com.cn.zengzeng.spbzengzeng.utils.LocalThreadPoolTaskExecutor;
import com.cn.zengzeng.spbzengzeng.utils.ThreadPoolExecutorFactory;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @Author: ZhangZengZeng
 * @Date: 2022/10/10 11:19
 */
public abstract class Abs {
    public String getName () {
        return "操作";
    }

    public class Demo extends Abs{
        @Override
        public String getName () {
            return super.getName();
        }
    }

    public static void main (String[] args) {
        LocalThreadPoolTaskExecutor threadPoolExecutor = ThreadPoolExecutorFactory.get(1000);
        List<String> list = new ArrayList<>();
        list.add("1");
        list.add("2");
        list.add("3");
        list.add("4");
        list.forEach(x->threadPoolExecutor.execute(()->{
            System.out.println("x = " + x);
        }));

    }
}
